package com.gator.desig_mode.flyweigth;

import org.springframework.context.ApplicationContext;

/**
 * @author 何章怀晓 hezhanghuaixiao
 * @version V1.0
 * @desc  分类抽象
 */
public abstract class WebSite {

  abstract void use();

}



//具体实现类
class H5 extends WebSite {

  private int flag = 0;//默认0==h5   1==APP

  public H5(int flag) {
    this.flag = flag;
  }

  @Override
  void use() {
    System.out.println("使用h5");
  }
}



//具体实现类
class App extends WebSite {

  private int flag = 0;//默认0==h5   1==APP

  public App(int flag) {
    this.flag = flag;
  }

  @Override
  void use() {
    System.out.println("使用App");
  }
}
